home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / Principal.java < prev    next >
Text File  |  1998-10-14  |  2KB  |  67 lines

  1. /*
  2.  * @(#)Principal.java    1.13 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.security;
  16.  
  17. /**
  18.  * This interface represents a principal. A principal can be an
  19.  * individual, a corporation, a program thread; anything which can
  20.  * have an identity. See the <a href="../guide/security/Acl.html">ACL
  21.  * white paper</a> for more information.
  22.  *
  23.  * @see Identity
  24.  * @see Certificate
  25.  * @see java.security.acl.Acl
  26.  * @see java.security.acl.Group
  27.  *
  28.  * @version 1.13, 98/10/05
  29.  * @author Satish Dharmaraj 
  30.  */
  31. public interface Principal {
  32.  
  33.     /**
  34.      * Compares this principal to the specified object.  Returns true
  35.      * if the object passed in matches the principal represented by
  36.      * the implementation of this interface.  
  37.      *
  38.      * @param another the principal to compare with.
  39.      * 
  40.      * @return true if
  41.      * the principal passed in is the same as that encapsulated by
  42.      * this principal, false otherwise.
  43.      */
  44.     public boolean equals(Object another);
  45.     
  46.     /**
  47.      * Returns a string representation of this principal.  
  48.      *
  49.      * @return a string representation of this principal.
  50.      */
  51.     public String toString();
  52.  
  53.     /**
  54.      * Returns a hashcode for this principal.
  55.      *
  56.      * @return a hashcode for this principal.
  57.      */
  58.     public int hashCode();
  59.  
  60.     /**  
  61.      * Returns the name of this principal.
  62.      *
  63.      * @return the name of this principal.
  64.      */
  65.     public String getName();
  66. }
  67.